<ui:composition
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui">

    <p:panel header="Descargar mi catálogo completo" >

        <p:dialog modal="true" widgetVar="statusDialog" header="Status" draggable="false" closable="false" resizable="false">
            bajando...
        </p:dialog>

        <h:form id="form">

        <p:commandButton id="downloadLink" value="Download" ajax="false" onclick="PrimeFaces.monitorDownload(start, stop)"
                icon="ui-icon-arrowthichk-s">
            <p:fileDownload value="#{catalogoBean.catalogoCompleto}" />
        </p:commandButton>

        </h:form>

    <script type="text/javascript">
        function start() {
            statusDialog.show();
        }

        function stop() {
            statusDialog.hide();
        }
    </script>

    </p:panel>
   

</ui:composition>


